<template>
  <div>
    <van-swipe class="my-swipe" :autoplay="5000" :show-indicators="false">
      <van-swipe-item v-for="(item,index) in swiperList" :key="index">
        <van-image width="100%" fit="cover" :src="item.url" />
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
export default {
  name: 'PhoneSwiper',
  data () {
    return {
      current: 0,
      swiperList: [
        {
          'index': 1,
          'url': 'https://minedates.oss-cn-hangzhou.aliyuncs.com/station/bg/04.jpg'
        }, {
          'index': 2,
          'url': 'https://minedates.oss-cn-hangzhou.aliyuncs.com/station/bg/06.jpg'
        }, {
          'index': 3,
          'url': 'https://minedates.oss-cn-hangzhou.aliyuncs.com/station/bg/08.jpg'
        }, {
          'index': 4,
          'url': 'https://minedates.oss-cn-hangzhou.aliyuncs.com/station/bg/07.jpg'
        }, {
          'index': 5,
          'url': 'https://minedates.oss-cn-hangzhou.aliyuncs.com/station/bg/05.jpg'
        }]
    }
  },
  methods: {
    onChange (index) {
      this.current = index
    }
  }
}
</script>

<style scoped>
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  text-align: center;
}
</style>
